package main

import "fmt"

//声明结构体
type Cat struct {
	Name  string
	Age   int
	Color string
	Hobby string
	c1    *int              //指针
	c2    []int             //切片
	c3    map[string]string //map
}

func main() {
	//定义结构体变量
	var cat1 Cat

	cat1.Age = 3
	cat1.Name = "小白"
	cat1.Color = "白色"
	cat1.Hobby = "吃。。。。"
	fmt.Println("猫猫的信息如下")
	fmt.Println("name=", cat1.Name)
	fmt.Println("Hobby=", cat1.Hobby)
	fmt.Println("Color=", cat1.Color)
	fmt.Println("Age=", cat1.Age)
}
